<div ng-controller="javaRuleEditController">
    <ol class="breadcrumb">
        <li><a href="#">首页</a></li>
        <li><a href="#">动态规则</a></li>
        <li class="active">{{bean.id && "修改" || "新增"}}</li>
    </ol>
    <div>
        <form class="form-horizontal" name="form" autocomplete="off">
            <div class="form-group">
                <label class="text-right control-label col-sm-2 required">目标系统</label>
                <div class="col-sm-3"> 
                    <input type="text" ng-model="bean.target" class="form-control" name = "target" />
                </div>
                <label class="text-right control-label col-sm-2 required">所属分组</label>
                <div class="col-sm-3"> 
                    <input type="text" ng-model="bean.groupName" class="form-control" name = "groupName" />
                </div>
            </div>

            <div class="form-group">
                <label class="text-right control-label col-sm-2 required">规则名称</label>
                <div class="col-sm-8"> 
                    <input type="text" ng-model="bean.name" class="form-control" name = "name" />
                </div>
            </div>
            
            <div class="form-group">
                <label class="text-right control-label col-sm-2 required">说明</label>
                <div class="col-sm-8"> 
                    <textarea ng-model="bean.description" class="form-control" name = "description" rows="10"/>
                    <hui-validate target-model="bean.srcCode" type="text" required="true"></hui-validate>
                </div>
            </div>
            
            <div class="form-group">
                <label class="text-right control-label col-sm-2">优先级</label>
                <div class="col-sm-3"> 
                    <input type="text" ng-model="bean.sort" class="form-control" name = "sort" />
                    <span style="color: red;">不填写将使用默认值：Integer.MAX_VALUE（2147483647）</span>
                </div>
                <label class="col-sm-1 control-label col-sm-2 required">状态</label>
                <div class="col-sm-3" style="line-height:34px;">
                    <input type="radio" ng-model="bean.status" ng-value="1">&nbsp;启用
                    <input type="radio" ng-model="bean.status" ng-value="0" style="margin-left:15px;" >&nbsp;禁用
                </div>
            </div>
            
            <div class="form-group">
                <label class="text-right control-label col-sm-2 required">源码</label>
                <div class="col-sm-8"> 
                    <textarea ng-model="bean.srcCode" class="form-control" name = "srcCode" rows="36"/>
                    <hui-validate target-model="bean.srcCode" type="text" required="true"></hui-validate>
                </div>
            </div>
            <div class="form-group" align="center">
            	<div class="col-sm-offset-2">
	                <button class="btn btn-primary" ng-click="save($event, beforeSave)">
	                	保存
	                </button>
	                <button class="btn btn-default" onclick="history.back()">
	                    取消
	                </button>
                </div>
            </div>
        </form>
    </div>
</div>